// 定义store
import { defineStore } from "pinia";
import { ref } from 'vue';

export const useUserUpdateArticleIdStore = defineStore('yunzhou_updateArticleId', () => {
  const articleId = ref('')

  const getArticleId = () => {
    return articleId.value
  }

  const setArticleId = (newArticleId) => {
    articleId.value = newArticleId
  }

  const removeArticleId = () => {
    articleId.value = ''
  }

  return { articleId, getArticleId, setArticleId, removeArticleId }
}, {
  persist: true //参数持久化
})